package com.wsh.archive.service.businessImpl;

import java.util.HashMap;
import java.util.Map;

import com.wsh.archive.exception.ArchiveException;
import com.wsh.archive.service.business.ArchiveService;
import com.wsh.archive.vo.ArchiveDocVO;

public class ArchiveDocImpl implements ArchiveService<ArchiveDocVO> {
	
	/**
	 * {@inheritDoc}
	 */
	public Map<Integer, String> read(ArchiveDocVO vo) throws ArchiveException {
		
		final Map<Integer, String> result = new HashMap<Integer, String>();
		
//		try {
			
			System.out.println("arquivo .doc");
			
//			File file = new File(archiveVO.getUrlOrigem());
//			FileInputStream is = new FileInputStream(file);
//			
//			HWPFDocument wdoc = new HWPFDocument(is);
//			WordExtractor extractor = new WordExtractor(wdoc);
//			
//			
//			
//			result.put(1, extractor.getText());
			
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}	
		return result;
	}

	@Override
	public boolean export(ArchiveDocVO vo) throws ArchiveException {
		// TODO Auto-generated method stub
		return false;
	}

}
